package com.oss.controller.oss;


import com.oss.common.BaseResponse;
import com.oss.entity.oss.DividendManage;
import com.oss.service.oss.DividendManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/dividendManage")
public class DividendManageControlelr {
    @Autowired
    DividendManageService dividendManageService;

    @PostMapping("/selectByList")
    public BaseResponse<List<DividendManage>> selectByList(@RequestBody DividendManage dto){
        return BaseResponse.success(dividendManageService.selectByList(dto));
    }
    @PostMapping("/add")
    public BaseResponse<String> add(@RequestBody DividendManage dto){
        return BaseResponse.success(dividendManageService.add(dto));
    }
    @PostMapping("/updateData")
    public BaseResponse<String> updateData(@RequestBody DividendManage dto){
        return BaseResponse.success(dividendManageService.updateData(dto));
    }
    @PostMapping("/getByID")
    public BaseResponse<String> getById(@RequestBody DividendManage dto){
        return BaseResponse.success(dividendManageService.getById(dto.getId()));
    }
    @PostMapping("/delete")
    public BaseResponse<String> delete(@RequestBody DividendManage dto){
        return BaseResponse.success(dividendManageService.delete(dto.getId()));
    }
}